fix: Missing ec2:ModifyNetworkInterfaceAttribute permission in IPv6 IAM policy documentation#3554
Open
dcoppa wants to merge 2 commits intoaws:masterfrom
Open
fix: Missing ec2:ModifyNetworkInterfaceAttribute permission in IPv6 IAM policy documentation#3554dcoppa wants to merge 2 commits intoaws:masterfrom
dcoppa wants to merge 2 commits intoaws:masterfrom
Conversation
f5fd55a to
cac2c5f
Compare
…AM policy documentation The documented IPv6 IAM policy in docs/iam-policy.md is missing the ec2:ModifyNetworkInterfaceAttribute permission, which causes the VPC CNI to log UnauthorizedOperation warnings during operation.
cac2c5f to
20fff12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The documented IPv6 IAM policy in docs/iam-policy.md is missing the
ec2:ModifyNetworkInterfaceAttributepermission.What type of PR is this?
documentation
Which issue does this PR fix?:
Problem Description
When running EKS clusters in IPv6 mode with the documented IAM policy, the VPC CNI logs warnings like:
These warnings appear during:
aws-nodeDaemonSet pods are createdRoot Cause
The VPC CNI code calls
ec2:ModifyNetworkInterfaceAttributein both IPv4 and IPv6 modes:refreshSGIDsfunction (https://github.com/aws/amazon-vpc-cni-k8s/blob/master/pkg/awsutils/awsutils.go#L564-L586)AllocENIfunction (https://github.com/aws/amazon-vpc-cni-k8s/blob/master/pkg/awsutils/awsutils.go#L873-L882)The IPv6 documentation only includes IPv6-specific permissions (e.g.:
ec2:AssignIpv6Addresses) but omits ENI management permissions that are still required.Additional Notes
This issue was identified when attempting to fix it in terraform-aws-eks, but the maintainers noted that the upstream documentation (this repository) needs to be fixed first.
See: terraform-aws-modules/terraform-aws-eks#3613 (comment)
What does this PR do / Why do we need it?:
This PR fixes the documented IPv6 IAM policy which is missing the ec2:ModifyNetworkInterfaceAttribute permission.
Without this permission, users running IPv6 clusters see "UnauthorizedOperation" warnings in their aws-node pods, even though the documentation policy is supposed to be complete. While these warnings don't prevent the cluster from functioning, they indicate failed operations and clutter the event logs.
This fix adds the missing permission to the IPv6 policy documentation in docs/iam-policy.md, bringing it in line with what the VPC CNI actually requires to operate correctly.
Testing done on this change:
Tested on IPv6 EKS cluster running:
After applying the fix, the warnings disappeared and ENI attributes are properly managed.
Will this PR introduce any new dependencies?:
No.
Will this break upgrades or downgrades? Has updating a running cluster been tested?:
No.
Does this change require updates to the CNI daemonset config files to work?:
No.
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.